'''
Author: ytnetman 104924078@qq.com
Date: 2022-05-18 21:53:20
LastEditors: ytnetman 104924078@qq.com
LastEditTime: 2022-05-18 22:10:33
FilePath: \myvsh:\yqg\VSCode\ynt\长歌行.py
Description: 横排显示变成竖版显示
'''

# 列表显示古诗
print("\n古诗列表显示\n")
print("-"*7,"长歌行","-"*7)
verse1 = ["青青园中葵","朝露待日晞","阳春布德泽","万物生光辉","常恐秋节至","焜黄华叶衰",
         "百川东到海","何时复西归","少壮不努力","老大徒伤悲"]
for index,item in enumerate(verse1):
    if index%2 == 0:                       # 判断是否为偶数，为偶数时不换行
        print(item+"，", end='')           # end='' 的意思是不换行输出，是连续两个单引号
    else:
        print(item+"。")                   # 换行输出

# 元组显示古诗
print("\n古诗元组显示\n")
print("-"*7,"长歌行","-"*7)
verse2 = ("青青园中葵","朝露待日晞","阳春布德泽","万物生光辉","常恐秋节至","焜黄华叶衰",
         "百川东到海","何时复西归","少壮不努力","老大徒伤悲")
for index,item in enumerate(verse2):
    if index%2 == 0:                       # 判断是否为偶数，为偶数时不换行
        print(item+"，", end='')           # end='' 的意思是不换行输出，是连续两个单引号
    else:
        print(item+"。")                   # 换行输出
